package com.engine.salary.report.service.impl;

import cn.hutool.core.util.NumberUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.salaryacct.param.SalaryAcctEmployeeQueryParam;
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
import com.engine.salary.entity.salarysob.po.SalarySobPO;
import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam;
import com.engine.salary.entity.setting.param.PageListSettingQueryParam;
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.enums.UserStatusEnum;
import com.engine.salary.enums.auth.AuthFilterTypeEnum;
import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum;
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum;
import com.engine.salary.mapper.salaryacct.SalaryAcctEmployeeMapper;
import com.engine.salary.report.common.constant.SalaryConstant;
import com.engine.salary.report.entity.bo.SalaryStatisticsEmployeeBO;
import com.engine.salary.report.entity.dto.SalaryStatisticsEmployeeDetailResultDTO;
import com.engine.salary.report.entity.dto.SalaryStatisticsEmployeeListDTO;
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeDetailQueryParam;
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeQueryParam;
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeSalaryQueryParam;
import com.engine.salary.report.service.SalaryStatisticsEmployeeService;
import com.engine.salary.service.*;
import com.engine.salary.service.auth.AuthService;
import com.engine.salary.service.auth.AuthServiceImpl;
import com.engine.salary.service.impl.*;
import com.engine.salary.util.SalaryAssert;
import com.engine.salary.util.SalaryDateUtil;
import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.db.MapperProxyFactory;
import com.engine.salary.util.page.PageInfo;
import com.engine.salary.util.page.SalaryPageUtil;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.wbi.util.Util;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.hrm.User;

import java.util.*;
import java.util.stream.Collectors;

/**
 * 薪酬统计员工明细
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
@Slf4j
public class SalaryStatisticsEmployeeServiceImpl extends Service implements SalaryStatisticsEmployeeService {

    private SalaryAcctEmployeeMapper getSalaryAcctEmployeeMapper() {
        return MapperProxyFactory.getProxy(SalaryAcctEmployeeMapper.class);
    }

    private SalaryAcctEmployeeService getSalaryAcctEmployeeService(User user) {
        return ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user);
    }

    private SalaryAcctResultService getSalaryAcctResultService(User user) {
        return ServiceUtil.getService(SalaryAcctResultServiceImpl.class, user);
    }

    private SalaryItemService getSalaryItemService(User user) {
        return ServiceUtil.getService(SalaryItemServiceImpl.class, user);
    }

    private SalarySobService getSalarySobService(User user) {
        return ServiceUtil.getService(SalarySobServiceImpl.class, user);
    }

    private SalaryAcctRecordService getSalaryAcctRecordService(User user) {
        return ServiceUtil.getService(SalaryAcctRecordServiceImpl.class, user);
    }


//    private ExtEmployeeMapper extEmployeeMapper;

    private TaxAgentService getTaxAgentService(User user) {
        return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
    }

    private SalaryEmployeeService getSalaryEmployeeService(User user) {
        return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
    }

    public AuthService getAuthService(User user) {
        return ServiceUtil.getService(AuthServiceImpl.class, user);
    }

    private SettingService getSettingService(User user) {
        return ServiceUtil.getService(SettingServiceImpl.class, user);
    }

    @Override
    public PageInfo<SalaryStatisticsEmployeeListDTO> listPage(SalaryStatisticsEmployeeQueryParam queryParam) {
        List<SalaryStatisticsEmployeeListDTO> list = Collections.emptyList();
        PageInfo<SalaryStatisticsEmployeeListDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), list, SalaryStatisticsEmployeeListDTO.class);

        // 1.分权处理, 首先获取个税扣缴义务人参数
        TaxAgentQueryParam taxAgentQueryParam = new TaxAgentQueryParam();
        taxAgentQueryParam.setFilterType(AuthFilterTypeEnum.QUERY_DATA);
        Collection<TaxAgentPO> taxAgentViews = getTaxAgentService(user).listAuth(taxAgentQueryParam);
        List<Long> taxAgentIds = Objects.isNull(taxAgentViews) ? Lists.newArrayList() : taxAgentViews.stream().map(TaxAgentPO::getId).collect(Collectors.toList());
        if (CollectionUtils.isEmpty(taxAgentIds)) {
            return page;
        }

        // 2.年月参数处理，注意：薪资所属月居然是用字符串存储的，无法通过sql between处理
        Set<Date> salaryMonths = SalaryStatisticsEmployeeBO.getSalaryMonths(queryParam.getYear(), queryParam.getSalaryMonth())
                .stream()
                .map(SalaryDateUtil::dateStrToLocalYearMonth)
                .collect(Collectors.toSet());

        // 查询薪资核算人员
        SalaryAcctEmployeeQueryParam salaryAcctEmployeeQueryParam = SalaryAcctEmployeeQueryParam.builder().salaryMonths(salaryMonths).taxAgentIds(taxAgentIds).build();
        List<SalaryAcctEmployeePO> salaryAcctEmployeeList = getSalaryAcctEmployeeService(user).listByParam(salaryAcctEmployeeQueryParam);
        salaryAcctEmployeeList = getAuthService(user).auth(salaryAcctEmployeeList, AuthFilterTypeEnum.QUERY_DATA,SalaryAcctEmployeePO.class,"report");
        if (CollectionUtils.isEmpty(salaryAcctEmployeeList)) {
            return page;
        }

        // 内部人员id
        Set<Long> innerEmployeeIds = salaryAcctEmployeeList.stream().map(SalaryAcctEmployeePO::getEmployeeId).collect(Collectors.toCollection(LinkedHashSet::new));

        // 3.关键字搜索参数
        if (StringUtils.isNotEmpty(queryParam.getKeyword())) {
            if (CollectionUtils.isNotEmpty(innerEmployeeIds)) {
                List<DataCollectionEmployee> salaryEmployees = getSalaryEmployeeService(user).listAll(UseEmployeeTypeEnum.ALL);
                Set<Long> finalInnerEmployeeIds = innerEmployeeIds;
                innerEmployeeIds = salaryEmployees.stream()
                        .filter(e -> finalInnerEmployeeIds.contains(e.getEmployeeId()) && (e.getUsername().contains(queryParam.getKeyword()) || (StringUtils.isNotEmpty(e.getWorkcode()) && e.getWorkcode().contains(queryParam.getKeyword()))))
                        .map(DataCollectionEmployee::getEmployeeId)
                        .collect(Collectors.toSet());
            }
        }

        list = innerEmployeeIds.stream().map(e -> SalaryStatisticsEmployeeListDTO.builder().id(e).build()).collect(Collectors.toList());

        // 第一页数据显示处理
        page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), list, SalaryStatisticsEmployeeListDTO.class);
        List<SalaryStatisticsEmployeeListDTO> salaryStatisticsEmployeeListDTOs = page.getList();
        List<Long> employeeIds = salaryStatisticsEmployeeListDTOs.stream().map(SalaryStatisticsEmployeeListDTO::getId).collect(Collectors.toList());
        List<DataCollectionEmployee> simpleEmployeeList = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
        Map<Long, DataCollectionEmployee> innerEmployeeMap = simpleEmployeeList.stream().collect(Collectors.toMap(DataCollectionEmployee::getEmployeeId, v -> v));
        salaryStatisticsEmployeeListDTOs.forEach(e -> {
            DataCollectionEmployee simpleEmployee = innerEmployeeMap.get(e.getId());
            e.setName(Objects.isNull(simpleEmployee) ? "" : simpleEmployee.getUsername());
            e.setSubCompany(simpleEmployee.getSubcompanyName());
            e.setDepartment(simpleEmployee.getDepartmentName());
            e.setPosition(simpleEmployee.getJobtitleName());
            e.setStatus(UserStatusEnum.getDefaultLabelByValue(Integer.parseInt(simpleEmployee.getStatus())));
            e.setJobNum(simpleEmployee.getWorkcode());
            e.setIdNo(simpleEmployee.getIdNo());
        });
        page.setList(salaryStatisticsEmployeeListDTOs);
        return page;
    }


    @Override
    public SalaryStatisticsEmployeeDetailResultDTO getDetailSalaryAcctResult(SalaryStatisticsEmployeeDetailQueryParam queryParam) {
        SalaryAssert.notNull(queryParam.getEmployeeId(), SalaryI18nUtil.getI18nLabel(163974, "人员id不能为空"));

        // 薪资所属月参数，如果已经有年的就取交集
        Set<Date> salaryMonths = SalaryStatisticsEmployeeBO.getSalaryMonths(queryParam.getYear(), queryParam.getSalaryMonth()).stream().map(SalaryDateUtil::dateStrToLocalYearMonth).collect(Collectors.toSet());

        // 1.获取该员工所有核算人员数据
        SalaryAcctEmployeePO build = SalaryAcctEmployeePO.builder().employeeId(queryParam.getEmployeeId()).build();
        if (CollectionUtils.isNotEmpty(queryParam.getIds())) {
            build.setIds(queryParam.getIds());
        }
        if (CollectionUtils.isNotEmpty(salaryMonths)) {
            build.setSalaryMonths(salaryMonths);
        }
        if (Objects.nonNull(queryParam.getTaxAgentId())) {
            build.setTaxAgentId(queryParam.getTaxAgentId());
        }
        List<SalaryAcctEmployeePO> salaryAcctEmployees = getSalaryAcctEmployeeMapper().listSome(build);
        salaryAcctEmployees = salaryAcctEmployees.stream().sorted(Comparator.comparing(SalaryAcctEmployeePO::getSalaryMonth)).collect(Collectors.toList());
        Collections.reverse(salaryAcctEmployees);

        // 2.获取核算结果数据
        List<Long> salaryAcctEmployeeIds = salaryAcctEmployees.stream().map(SalaryAcctEmployeePO::getId).collect(Collectors.toList());
        List<SalaryAcctResultPO> salaryAcctResultValues = getSalaryAcctResultService(user).listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds);

        // 3.获取薪资项目
        Map<String, String> resultMap = Maps.newHashMap();
        salaryAcctResultValues.forEach(sv -> {
            resultMap.put(sv.getSalaryItemId() + "", sv.getResultValue());
        });
        List<Long> salaryItemIds = resultMap.keySet().stream().map(Long::valueOf).collect(Collectors.toList());
        List<SalaryItemPO> salaryItemList = CollectionUtils.isEmpty(salaryItemIds) ? Lists.newArrayList() : getSalaryItemService(user).listByIds(salaryItemIds);

        return SalaryStatisticsEmployeeDetailResultDTO.builder()
                .salaryAcctEmployeeList(salaryAcctEmployees)
                .salaryAcctResultValueList(salaryAcctResultValues)
                .salaryItemList(salaryItemList)
                .build();
    }

    @Override
    public List<Map<String, Object>> listDetailPage(SalaryStatisticsEmployeeDetailResultDTO salaryStatisticsEmployeeDetailResult, SalaryStatisticsEmployeeDetailQueryParam queryParam) {

        List<TaxAgentPO> taxAgentList = getTaxAgentService(user).listAll();
        Map<Long, String> taxAgentMap = SalaryEntityUtil.convert2Map(taxAgentList, TaxAgentPO::getId, TaxAgentPO::getName);

        List<SalarySobPO> salarySobPOS = getSalarySobService(user).listAll();
        Map<Long, String> SalarySobMap = SalaryEntityUtil.convert2Map(salarySobPOS, SalarySobPO::getId, SalarySobPO::getName);

        List<SalaryAcctRecordPO> salaryAcctRecordPOS = getSalaryAcctRecordService(user).listAll();
        Map<Long, Integer> salaryAcctRecordMap = SalaryEntityUtil.convert2Map(salaryAcctRecordPOS, SalaryAcctRecordPO::getId, SalaryAcctRecordPO::getAcctTimes);

        List<SalaryItemPO> salaryItemPOList = getSalaryItemService(user).listAll();
        Map<Long, String> itemDataTypeMap = SalaryEntityUtil.convert2Map(salaryItemPOList, SalaryItemPO::getId, SalaryItemPO::getDataType);


        Map<Long, List<SalaryAcctResultPO>> acctResultValueList = SalaryEntityUtil.group2Map(salaryStatisticsEmployeeDetailResult.getSalaryAcctResultValueList(), SalaryAcctResultPO::getSalaryAcctEmpId);
        Map<Long, Map<String, Object>> acctResultValueMap = new HashMap<>();
        acctResultValueList.forEach((k, v) -> {
            Map<String, Object> map = new HashMap();
            v.forEach(l -> {
                String dataType = itemDataTypeMap.getOrDefault(l.getSalaryItemId(), "string");
                SalaryDataTypeEnum typeEnum = SalaryDataTypeEnum.parseByValue(dataType);
                String resultValue = l.getResultValue();
                if (typeEnum == SalaryDataTypeEnum.NUMBER && NumberUtil.isNumber(resultValue)) {
                    map.put(l.getSalaryItemId() + "", Double.valueOf(resultValue));
                } else {
                    map.put(l.getSalaryItemId() + "", resultValue);
                }
            });
            acctResultValueMap.put(k, map);
        });

        // 获取人员信息
        List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).listByIds(salaryStatisticsEmployeeDetailResult.getSalaryAcctEmployeeList().stream().map(SalaryAcctEmployeePO::getEmployeeId).distinct().collect(Collectors.toList()));
        Map<Long, DataCollectionEmployee> empMap = SalaryEntityUtil.convert2Map(employeeList, DataCollectionEmployee::getEmployeeId);
        List<Map<String, Object>> list = Lists.newArrayList();
        Map<String, Object> map;
        for (SalaryAcctEmployeePO se : salaryStatisticsEmployeeDetailResult.getSalaryAcctEmployeeList()) {
            map = Maps.newHashMap();
            Map<String, Object> resultValueMap = Optional.ofNullable(acctResultValueMap.get(se.getId())).orElse(Maps.newHashMap());
            Map<String, Object> finalMap = map;
            resultValueMap.forEach((k, v) -> {
                finalMap.put(k + SalaryConstant.DYNAMIC_SUFFIX, v);
            });
            DataCollectionEmployee emp = empMap.getOrDefault(se.getEmployeeId(), DataCollectionEmployee.builder().build());
            map.put("id", se.getId().toString());
            map.put("salaryMonth", SalaryDateUtil.getFormatYearMonth(se.getSalaryMonth()));
            map.put("taxAgent", taxAgentMap.get(se.getTaxAgentId()));
            map.put("salarySob", SalarySobMap.get(se.getSalarySobId()));
            map.put("acctTimes", salaryAcctRecordMap.get(se.getSalaryAcctRecordId()));
            map.put("userName", Util.null2String(emp.getUsername()));
            map.put("subCompany", Util.null2String(emp.getSubcompanyName()));
            map.put("department", Util.null2String(emp.getDepartmentName()));
            map.put("jobTitle", Util.null2String(emp.getJobtitleName()));
            map.put("status", Util.null2String(NumberUtil.isNumber(emp.getStatus()) ? SalaryEmployeeStatusEnum.parseByValue(Integer.valueOf(emp.getStatus())).getDefaultLabel() : null));
            map.put("workCode", Util.null2String(emp.getWorkcode()));
            map.put("idNo", Util.null2String(emp.getIdNo()));
            map.put("companystartdate", Util.null2String(emp.getCompanystartdate()));

//            IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByValue(Integer.parseInt(se.getIncomeCategory()));
//            map.put("incomeCategory", Objects.isNull(incomeCategoryEnum) ? "" : SalaryI18nUtil.getI18nLabel(incomeCategoryEnum.getLabelId(), incomeCategoryEnum.getDefaultLabel()));
            list.add(map);
        }
        return list;
    }

    @Override
    public PageInfo<SalaryAcctEmployeePO> listSalaryAcctEmp(SalaryStatisticsEmployeeSalaryQueryParam queryParam) {
        // 1.分权处理, 首先获取个税扣缴义务人参数
        TaxAgentQueryParam param = TaxAgentQueryParam.builder().build();
        param.setFilterType(AuthFilterTypeEnum.QUERY_DATA);
        Collection<TaxAgentPO> taxAgentViews = getTaxAgentService(user).listAuth(param);
        List<Long> taxAgentIds = Objects.isNull(taxAgentViews) ? Lists.newArrayList() : taxAgentViews.stream().map(TaxAgentPO::getId).collect(Collectors.toList());
        if (CollectionUtils.isNotEmpty(queryParam.getTaxAgentIds())) {
            taxAgentIds = taxAgentIds.stream().filter(queryParam.getTaxAgentIds()::contains).collect(Collectors.toList());
        }
        if (CollectionUtils.isEmpty(taxAgentIds)) {
            return new PageInfo<>();
        }

        // 2.年月参数处理，注意：薪资所属月居然是用字符串存储的，无法通过sql between处理
        List<Date> dataParam = new ArrayList<>();
        if (StringUtils.isNotBlank(queryParam.getStartDateStr())) {
            dataParam.add(SalaryDateUtil.dateStrToLocalTime(queryParam.getStartDateStr() + "-01 00:00:00"));
        }
        if (StringUtils.isNotBlank(queryParam.getEndDateStr())) {
            dataParam.add(SalaryDateUtil.dateStrToLocalTime(queryParam.getEndDateStr() + "-01 00:00:00"));
        }
        Set<Date> salaryMonths = SalaryStatisticsEmployeeBO.getSalaryMonths(null, dataParam)
                .stream()
                .map(SalaryDateUtil::dateStrToLocalYearMonth)
                .collect(Collectors.toSet());

        // 查询薪资核算人员
        SalaryAcctEmployeeQueryParam salaryAcctEmployeeQueryParam = SalaryAcctEmployeeQueryParam.builder().salaryMonths(salaryMonths).taxAgentIds(taxAgentIds).build();
        List<SalaryAcctEmployeePO> salaryAcctEmployeeList = getSalaryAcctEmployeeService(user).listByParam(salaryAcctEmployeeQueryParam);
        salaryAcctEmployeeList = getAuthService(user).auth(salaryAcctEmployeeList, AuthFilterTypeEnum.QUERY_DATA,SalaryAcctEmployeePO.class,"report");

        if (CollectionUtils.isNotEmpty(queryParam.getSubCompanyIds()) || CollectionUtils.isNotEmpty(queryParam.getDepartmentIds()) || StringUtils.isNotBlank(queryParam.getKeyword())) {
            // 根据分部、部门筛选
            List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).listBySubCompanyOrDepartment(queryParam.getSubCompanyIds(), queryParam.getDepartmentIds());
            // 根据关键词过滤
            if (StringUtils.isNotBlank(queryParam.getKeyword())) {
                employeeList = employeeList.stream()
                        .filter(e -> (StringUtils.isNotEmpty(e.getUsername()) && e.getUsername().contains(queryParam.getKeyword()) || (StringUtils.isNotEmpty(e.getWorkcode()) && e.getWorkcode().contains(queryParam.getKeyword()))))
                        .collect(Collectors.toList());
            }
            List<Long> employeeIds = employeeList.stream().map(DataCollectionEmployee::getEmployeeId).collect(Collectors.toList());
            salaryAcctEmployeeList = salaryAcctEmployeeList.stream().filter(acctEmp -> employeeIds.contains(acctEmp.getEmployeeId())).collect(Collectors.toList());
        }

        //人员浏览按钮筛选
        List<Long> employeeIds = queryParam.getEmployeeIds();
        if(CollectionUtils.isNotEmpty(employeeIds)){
            salaryAcctEmployeeList = salaryAcctEmployeeList.stream().filter(acctEmp -> employeeIds.contains(acctEmp.getEmployeeId())).collect(Collectors.toList());
        }

        if (CollectionUtils.isEmpty(salaryAcctEmployeeList)) {
            return new PageInfo<>();
        }

        // 分页
        if (CollectionUtils.isNotEmpty(queryParam.getIds())) {
            salaryAcctEmployeeList = salaryAcctEmployeeList.stream().filter(emp -> queryParam.getIds().contains(emp.getId())).collect(Collectors.toList());
        }
        salaryAcctEmployeeList = salaryAcctEmployeeList.stream().sorted(Comparator.comparing(SalaryAcctEmployeePO::getSalaryMonth).reversed()).collect(Collectors.toList());
        PageInfo<SalaryAcctEmployeePO> salaryAcctEmployeePageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), salaryAcctEmployeeList);
        if (queryParam.isExport()) {
            salaryAcctEmployeePageInfo.setList(salaryAcctEmployeeList);
        }
        return salaryAcctEmployeePageInfo;
    }

    @Override
    public SalaryStatisticsEmployeeDetailResultDTO getDetailSalaryAcctResultByAcctEmp(List<SalaryAcctEmployeePO> salaryAcctEmployeeList) {
        // 3.获取薪资项目
        List<SalaryItemPO> salaryItemList = getSalaryItemService(user).listAll();
        salaryItemList = salaryItemList.stream()
                .sorted(new Comparator<SalaryItemPO>() {
                    @Override
                    public int compare(SalaryItemPO o1, SalaryItemPO o2) {
                        if (o1.getSortedIndex() == null && o2.getSortedIndex() == null) {
                            Integer systemType1 = o1.getSystemType() == null ? 0 : o1.getSystemType();
                            Integer systemType2 = o2.getSystemType() == null ? 0 : o2.getSystemType();
                            return systemType1.compareTo(systemType2);
                        } else {
                            Integer sortedIndex1 = o1.getSortedIndex() == null ? 0 : o1.getSortedIndex();
                            Integer sortedIndex2 = o2.getSortedIndex() == null ? 0 : o2.getSortedIndex();
                            return sortedIndex2.compareTo(sortedIndex1);
                        }
                    }
                })
                .collect(Collectors.toList());
        if (CollectionUtils.isEmpty(salaryAcctEmployeeList)) {
            return SalaryStatisticsEmployeeDetailResultDTO.builder()
                    .salaryAcctEmployeeList(Collections.emptyList())
                    .salaryAcctResultValueList(Collections.emptyList())
                    .salaryItemList(salaryItemList)
                    .build();
        }

        // 获取核算结果数据
        List<Long> salaryAcctEmployeeIds = salaryAcctEmployeeList.stream().map(SalaryAcctEmployeePO::getId).collect(Collectors.toList());
        List<SalaryAcctResultPO> salaryAcctResultValues = getSalaryAcctResultService(user).listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds);

        return SalaryStatisticsEmployeeDetailResultDTO.builder()
                .salaryAcctEmployeeList(salaryAcctEmployeeList)
                .salaryAcctResultValueList(salaryAcctResultValues)
                .salaryItemList(salaryItemList)
                .build();
    }
}
